//--------------------------------------------
//
// copyright@2008,all right reserved by ax.
//
//
//     PROJECT   :   futrue
//
//     FILE      :   BaseCmdPool.cpp
//
//     PURPOSE   :   futrue project main file
//   
//     DATE      :   2008/10/01
//
//     AUTHOR    :   ax
//
//--------------------------------------------
 
#include "BaseCmdPool.h"
#include "ArrayPool.h"
#include <map>
class PoolObj
{
public:
	PoolObj()
	{
	  // m_cMapCmdPool.clear();
	  m_arCmdPool = NULL;
	}
	~PoolObj()
	{
	  
	}

public:
	BaseCommand* Alloc(int nKey)
	{
	  std::map<int,BaseCommand*>::iterator it = m_cMapCmdPool.find(nKey);
	  
	  return NULL;
	}

	void Free(BaseCommand* p)
	{
	  int nKey = p->GetKey();
	  if(nKey > KEY_CMD_MAX || nKey < KEY_CMD_MIN)
	    {
	      assert(0);
	      return;
	    }
	  if(m_arCmdPool == NULL)
	    {
	      assert(0);
	      return;
	    }
	  m_arCmdPool[nKey].

	}
private:

  ArrayPool<BaseCommand>    m_arCmdPool[KEY_CMD_MAX];

  //  std::map<int,BaseCommand* > m_cMapCmdPool;
};

BaseCmdPool:: BaseCmdPool()
{
}

 
int  BaseCmdPool:: Init()
{
	return 0;
}

void BaseCmdPool:: UnInit()
{
}

BaseCommand*  BaseCmdPool:: Alloc(int nKey)
{
	return m_pPool->Alloc(nKey);
}

void  BaseCmdPool:: Free(BaseCommand* p)
{
	return m_pPool->Free(p);
}

